//k1 edit 22.2.25

private ["_center","_rotation","_obj","_pos","_parkedVehicleClasses"];

_center               = [_this, 0] call bis_fnc_param;
_rotation             = [_this, 1] call bis_fnc_param;
_staticWeaponClasses  = [_this, 2, []] call bis_fnc_param;
_parkedVehicleClasses = [_this, 3, []] call bis_fnc_param;
_parkedArmorClasses   = [_this, 4, []] call bis_fnc_param;
_staticAAClasses      = [_this, 5, []] call bis_fnc_param;

if (isNil "A3E_MotorPoolMarkerNumber") then {
    A3E_MotorPoolMarkerNumber = 0;
} else {
    A3E_MotorPoolMarkerNumber = A3E_MotorPoolMarkerNumber + 1;
};
_mNumber = A3E_MotorPoolMarkerNumber;

_fnc_createObject = {
    params["_className","_centerPos","_relativePos","_rotateDir","_relativeDir"];
    private["_object", "_realPos", "_realDir"];

    _fnc_rotatePos = {
        private ["_centerPos", "_pos", "_dir"];
        private ["_px", "_py", "_mpx", "_mpy", "_ma", "_rpx", "_rpy"];
        _centerPos = _this select 0;
        _pos = _this select 1;
        _dir = _this select 2;
        _px = _pos select 0;
        _py = _pos select 1;
        _mpx = _centerPos select 0;
        _mpy = _centerPos select 1;
        _ma = _dir;
        _rpx = ( (_px - _mpx) * cos(_ma) ) + ( (_py - _mpy) * sin(_ma) ) + _mpx;
        _rpy = (-(_px - _mpx) * sin(_ma) ) + ( (_py - _mpy) * cos(_ma) ) + _mpy;
        [_rpx, _rpy, (_pos select 2)];
    };

    _realPos = ([_centerPos, [(_centerPos select 0) + (_relativePos select 0), (_centerPos select 1) + (_relativePos select 1),(_relativePos select 2)], _rotateDir] call _fnc_rotatePos);
    _object = createVehicle [_className, _realPos, [], 0, "CAN_COLLIDE"];
    _object setdir (_relativeDir + _rotateDir);
    _object setPosATL _realPos;
    _object
};

_obj = ['Land_HBarrier_5_F',_center,[-29.7,-18.2,0],_rotation,270] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-29.7,-23.2,0],_rotation,270] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-29.7,-12.7,0],_rotation,270] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-29.7,-7.2,0],_rotation,270] call _fnc_createObject;
_obj = ['Land_HBarrierTower_F',_center,[-31.7,-12.4,0],_rotation,90] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-29.7,20.3,0],_rotation,270] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-29.7,9.3,0],_rotation,270] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-29.7,14.8,0],_rotation,270] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-29.7,3.8,0],_rotation,270] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-29.7,-1.7,0],_rotation,270] call _fnc_createObject;
_obj = ['Land_HBarrierTower_F',_center,[-31.7,9.8,0],_rotation,90] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-27.7,-26.7,0],_rotation,180] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-0.2,-18.2,0],_rotation,90] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-5.7,-26.7,0],_rotation,180] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-11.2,-26.7,0],_rotation,180] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-16.7,-26.7,0],_rotation,180] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-22.2,-26.7,0],_rotation,180] call _fnc_createObject;
_obj = ['Land_Cargo_Patrol_V3_F',_center,[-18.5,-17.7,0],_rotation,0] call _fnc_createObject;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-1.5,-20.9,0],_rotation,0] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-13.5,-20.9,0],_rotation,0] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-23.2,-14.9,0],_rotation,90] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-14,-18.9,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-23.2,-10.9,0],_rotation,90] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-23.2,-6.9,0],_rotation,90] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-14,-15.4,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-21.3,-6.7,0],_rotation,360] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-9.3,-6.7,0],_rotation,360] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-3.5,-4.9,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-17.3,-6.7,0],_rotation,360] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-13.3,-6.7,0],_rotation,360] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-17.5,-20.9,0],_rotation,0] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-5.2,-6.7,0],_rotation,360] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-23.2,-18.9,0],_rotation,90] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-5.5,-20.9,0],_rotation,0] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-9.5,-20.9,0],_rotation,0] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-21.5,-20.9,0],_rotation,0] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_BagBunker_Small_F',_center,[2.3,-4.7,0],_rotation,359] call _fnc_createObject;
_obj = ['Land_BagBunker_Small_F',_center,[-15.5,-11.9,0],_rotation,270] call _fnc_createObject;
_obj = ['Land_BagBunker_Tower_F',_center,[-1.7,-30.7,0],_rotation,0] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-5.7,24.1,0],_rotation,0] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-27.7,24.1,0],_rotation,0] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-16.7,24.1,0],_rotation,0] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-22.2,24.1,0],_rotation,0] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-0.2,24.1,0],_rotation,0] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[-11.2,24.1,0],_rotation,0] call _fnc_createObject;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-9.7,20.3,0],_rotation,180] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-23.2,5.1,0],_rotation,90] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[2.3,20.3,0],_rotation,180] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-23.2,-2.9,0],_rotation,90] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-21.7,20.3,0],_rotation,180] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-23.2,1.1,0],_rotation,90] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-17.7,20.3,0],_rotation,180] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-5.7,20.3,0],_rotation,180] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-23.2,18.8,0.1],_rotation,90] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-3.5,-3.4,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-23.2,17.1,0],_rotation,90] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-23.2,9.1,0],_rotation,90] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-13.7,20.3,0],_rotation,180] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[2.8,0.6,0],_rotation,180] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-1.7,20.3,0],_rotation,180] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[-23.2,13.1,0],_rotation,90] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_LampAirport_F',_center,[0.4,-3.1,0],_rotation,0] call _fnc_createObject;
_obj = ['Land_Razorwire_F',_center,[-6.5,17.6,0],_rotation,0] call _fnc_createObject;
_obj = ['Land_Razorwire_F',_center,[-19.7,2.3,0],_rotation,270] call _fnc_createObject;
_obj = ['Land_Razorwire_F',_center,[-14.5,17.6,0],_rotation,0] call _fnc_createObject;
_obj = ['Land_Razorwire_F',_center,[-19.7,13.3,0],_rotation,271] call _fnc_createObject;
_obj = ['Land_HBarrierTower_F',_center,[-13.5,26.1,0],_rotation,180] call _fnc_createObject;
_obj = ['Land_GuardTower_02_F',_center,[-21.7,18.6,0],_rotation,315] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_HBarrier_5_F',_center,[23.8,-23.2,0],_rotation,90] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[21.8,-26.7,0],_rotation,180] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[16.3,-26.7,0],_rotation,180] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[23.8,-6.7,0],_rotation,90] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[11.5,-26.7,0],_rotation,180] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[23.8,-12.2,0],_rotation,90] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[23.8,-17.7,0],_rotation,90] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[9.5,-30.2,0],_rotation,270] call _fnc_createObject;
_obj = ['Land_Cargo_Patrol_V3_F',_center,[13.3,-17.7,0],_rotation,0] call _fnc_createObject;
_obj = ['Land_Mil_WallBig_4m_F',_center,[18.8,-13.4,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[17.1,-20.9,0],_rotation,1] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[9.3,-15.7,0],_rotation,90] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[6.8,-6.7,0],_rotation,360] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[10.8,-6.7,0],_rotation,360] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[10.5,-20.9,0],_rotation,0] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[18.8,-19.3,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[14.5,-20.9,0],_rotation,0] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[18.8,-9.4,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[4.8,-4.9,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[9.3,-19.2,0],_rotation,90] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[18.8,-5.4,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[18.8,-17.4,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_BarGate_F',_center,[6,-33.9,0],_rotation,0] call _fnc_createObject;
_obj = ['Land_HBarrierTower_F',_center,[25.8,-11.9,0],_rotation,270] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[23.8,4.3,0],_rotation,90] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[5.3,24.1,0],_rotation,0] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[10.8,24.1,0],_rotation,0] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[23.8,-1.2,0],_rotation,90] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[23.8,9.8,0],_rotation,90] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[23.8,15.1,0],_rotation,90] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[21.8,24.1,0],_rotation,0] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[16.3,24.1,0],_rotation,0] call _fnc_createObject;
_obj = ['Land_HBarrier_5_F',_center,[23.8,20.6,0],_rotation,90] call _fnc_createObject;
_obj = ['Land_Mil_WallBig_4m_F',_center,[4.6,7,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[4.6,3,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[18.8,14.6,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[18.8,6.6,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[3.4,14,0],_rotation,225] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[18.8,2.6,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[6.3,20.3,0],_rotation,180] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[14.3,20.3,0],_rotation,180] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[4.6,11,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[18.7,18.5,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[18.8,10.6,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[10.3,20.3,0],_rotation,180] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[18.8,-1.4,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[4.6,-1,0],_rotation,270] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Mil_WallBig_4m_F',_center,[17.1,20.3,0],_rotation,183] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Cargo_House_V1_F',_center,[9.8,3.3,0.8],_rotation,270] call _fnc_createObject;
_obj = ['Land_Cargo_House_V1_F',_center,[9.8,-2.9,0.8],_rotation,270] call _fnc_createObject;
_obj = ['Land_HBarrierTower_F',_center,[25.8,10.3,0],_rotation,270] call _fnc_createObject;
_obj = ['Land_HBarrierTower_F',_center,[8.8,26.1,0],_rotation,180] call _fnc_createObject;
_obj = ['Land_GuardTower_02_F',_center,[17.1,18.3,0],_rotation,45] call _fnc_createObject;
_obj allowDamage false;
_obj = ['Land_Radar_01_HQ_F',_center,[-7,5.1,0],_rotation,90] call _fnc_createObject;
_obj allowDamage false; //导致窗口玻璃打不坏
_obj spawn {sleep 8; _this allowDamage true};

_addCargoGlobal = {
	clearItemCargoGlobal _obj;
	clearWeaponCargoGlobal _obj;
	clearMagazineCargoGlobal _obj;
	clearBackpackCargoGlobal _obj;
	_items params ['_arr1', '_arr2'];
	{_obj addItemCargoGlobal [_arr1 select _forEachIndex, _x]} forEach _arr2;
	_weapons params ['_arr1', '_arr2'];
	{_obj addWeaponCargoGlobal [_arr1 select _forEachIndex, _x]} forEach _arr2;
	_magazines params ['_arr1', '_arr2'];
	{_obj addMagazineCargoGlobal [_arr1 select _forEachIndex, _x]} forEach _arr2;
	_backpacks params ['_arr1', '_arr2'];
	{_obj addBackpackCargoGlobal [_arr1 select _forEachIndex, _x]} forEach _arr2;
};
_obj = ['C_IDAP_supplyCrate_F',_center,[-11,5.8,5],_rotation,271] call _fnc_createObject;
_obj allowDamage false;
/*[_obj,[[[["arifle_RPK12_F"],[]],[["75rnd_762x39_AK12_Mag_Tracer_F"],[]],[["acc_pointer_IR"],[]],[[],[]]],true]] call bis_fnc_initAmmoBox;*/
_items = [[],[]];
_weapons = [["arifle_SPAR_02_blk_F","arifle_MXM_Black_MOS_Pointer_Bipod_Snds_F","arifle_RPK12_lush_holo_snds_pointer_F","arifle_MSBS65_Mark_SOS_LP_BI_F","LMG_Zafir_ARCO_F","LMG_03_Vehicle_F","LMG_Mk200_black_LP_BI_F","srifle_LRR_camo_SOS_F","srifle_DMR_02_camo_AMS_LP_F","srifle_DMR_05_DMS_snds_F"],[5,5,5,5,5,5,5,5,5,5]];
_magazines = [["75rnd_762x39_AK12_Mag_Tracer_F","150Rnd_556x45_Drum_Mag_Tracer_F","7Rnd_408_Mag","10Rnd_338_Mag","10Rnd_93x64_DMR_05_Mag","100Rnd_65x39_caseless_black_mag_tracer","30Rnd_65x39_caseless_msbs_mag_Tracer","200Rnd_65x39_cased_Box_Tracer_Red","150Rnd_762x54_Box_Tracer","200Rnd_556x45_Box_F"],[40,40,40,40,40,40,40,40,40,40]];
_backpacks = [[],[]];
call _addCargoGlobal;
_obj = ['Box_East_Wps_F',_center,[-0.2,10.1,0],_rotation,360] call _fnc_createObject;
_obj allowDamage false;
_items = [["FirstAidKit"],[30]];
_weapons = [["arifle_MX_khk_F","arifle_AK12_arid_F"],[5,5]];
_magazines = [["30Rnd_65x39_caseless_khaki_mag","30Rnd_762x39_AK12_Mag_F"],[25,25]];
_backpacks = [[],[]];
call _addCargoGlobal;
_obj = ['Box_EAF_Uniforms_F',_center,[-5.6,3.6,0.9],_rotation,360] call _fnc_createObject;
_obj allowDamage false;
_items = [["V_PlateCarrierSpec_blk","H_HelmetLeaderO_ocamo","ItemGPS","FirstAidKit","Medikit","ToolKit","NVGogglesB_blk_F"],[10,10,10,50,5,5,10]];
_weapons = [[],[]];
_magazines = [[],[]];
_backpacks = [["B_Bergen_mcamo_F"],[10]];
call _addCargoGlobal;

_MGGMH = a3e_arr_Escape_SWC_MG_H + a3e_arr_Escape_SWC_GM_H;
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-16,-0.2,4.9],_rotation,182] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-14.7,-0.5,0.9],_rotation,244] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-17.3,12.3,0.9],_rotation,325] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-9.4,15.2,0.9],_rotation,49] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-5,0.1,4.9],_rotation,177] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-6.7,15.1,0.9],_rotation,63] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-8.7,-0.2,4.9],_rotation,177] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-4.7,15.1,4.9],_rotation,4] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-17,13.6,4.9],_rotation,272] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-3.7,9.3,4.9],_rotation,88] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-17.4,-0.3,0.9],_rotation,337] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-17.5,15.3,0.9],_rotation,61] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-17.2,1.6,4.9],_rotation,273] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-8.4,15.1,4.9],_rotation,4] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-3.7,13.3,4.9],_rotation,88] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-15.5,15.1,4.9],_rotation,4] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-6.9,-0.3,0.9],_rotation,255] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-13.5,28,2.3],_rotation,358] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-33.7,-12.2,2.3],_rotation,271] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-33.7,9.9,2.3],_rotation,278] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-19.7,-18.2,4.3],_rotation,190] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-2,-32.4,2.8],_rotation,180] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[-15.2,-11.9,0],_rotation,93] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[2.3,-5.2,0],_rotation,178] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[14.6,-19,4.3],_rotation,181] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[27.7,-12.2,2.3],_rotation,93] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[27.7,10.4,2.3],_rotation,92] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom _MGGMH;
_obj = [_gun,_center,[8.9,28,2.3],_rotation,1] call _fnc_createObject;
Escape_allStatics pushback _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];

_MGA = a3e_arr_Escape_SWC_MG_A; //自动机枪
_gun = selectRandom _MGA;
_obj = [_gun,_center,[-1.5,-29.5,0.1],_rotation,89] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _MGA;
_obj = [_gun,_center,[-15.2,-12,2.1],_rotation,90] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _MGA;
_obj = [_gun,_center,[-28,-24.4,0.1],_rotation,1] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _MGA;
_obj = [_gun,_center,[-25.9,-25,0.1],_rotation,89] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _MGA;
_obj = [_gun,_center,[-21.5,-4.9,0.1],_rotation,1] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _MGA;
_obj = [_gun,_center,[-5.3,-4.7,0.1],_rotation,269] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _MGA;
_obj = [_gun,_center,[-12.2,14.8,1],_rotation,181] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _MGA;
_obj = [_gun,_center,[-0.2,8.3,0.1],_rotation,180] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _MGA;
_obj = [_gun,_center,[-12.9,-0.1,5],_rotation,359] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _MGA;
_obj = [_gun,_center,[-11.6,13.8,5],_rotation,206] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _MGA;
_obj = [_gun,_center,[-20.5,19,0.1],_rotation,90] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _MGA;
_obj = [_gun,_center,[7.8,-4.2,0.1],_rotation,109] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _MGA;
_obj = [_gun,_center,[19.7,-24.9,0.1],_rotation,270] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _MGA;
_obj = [_gun,_center,[22,-24.5,0.1],_rotation,357] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _MGA;
_obj = [_gun,_center,[17.6,-18.6,0.1],_rotation,309] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _MGA;
_obj = [_gun,_center,[16.2,17.7,0.1],_rotation,180] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _MGA;
_obj = [_gun,_center,[3.8,2.1,0.1],_rotation,0] call _fnc_createObject;
Escape_allStatics pushback _obj;
//自动榴弹
_GMA = a3e_arr_Escape_SWC_GM_A;
_gun = selectRandom _GMA;
_obj = [_gun,_center,[-1.9,-32.6,5],_rotation,180] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _GMA;
_obj = [_gun,_center,[-33.1,-12.3,4.3],_rotation,270] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _GMA;
_obj = [_gun,_center,[-33.1,9.9,4.3],_rotation,270] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _GMA;
_obj = [_gun,_center,[-13.5,27.5,4.3],_rotation,360] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _GMA;
_obj = [_gun,_center,[27.2,-12,4.3],_rotation,90] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _GMA;
_obj = [_gun,_center,[8.8,27.5,4.3],_rotation,0] call _fnc_createObject;
Escape_allStatics pushback _obj;
_gun = selectRandom _GMA;
_obj = [_gun,_center,[27.5,10.3,4.3],_rotation,90] call _fnc_createObject;
Escape_allStatics pushback _obj;

_gun = selectRandom a3e_arr_Escape_SWC_launcher_AT;
_obj = [_gun,_center,[-17.2,15.1,8.9],_rotation,314] call _fnc_createObject;
[_obj,A3E_VAR_Side_Opfor] spawn A3E_fnc_AddStaticGunner;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom a3e_arr_Escape_SWC_launcher_AT;
_obj = [_gun,_center,[-17,-0.4,8.9],_rotation,240] call _fnc_createObject;
[_obj,A3E_VAR_Side_Opfor] spawn A3E_fnc_AddStaticGunner;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom a3e_arr_Escape_SWC_launcher_AT;
_obj = [_gun,_center,[-3.7,0.1,8.9],_rotation,136] call _fnc_createObject;
[_obj,A3E_VAR_Side_Opfor] spawn A3E_fnc_AddStaticGunner;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_gun = selectRandom a3e_arr_Escape_SWC_launcher_AT;
_obj = [_gun,_center,[-3.7,15.1,8.9],_rotation,40] call _fnc_createObject;
[_obj,A3E_VAR_Side_Opfor] spawn A3E_fnc_AddStaticGunner;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];

_obj = ['B_SAM_System_01_F',_center,[-4.9,7.2,8.9],_rotation,88] call _fnc_createObject;
_obj setMass 99999;
createVehicleCrew _obj;
if (side _obj != A3E_VAR_Side_Opfor) then {_grp = createGroup [A3E_VAR_Side_Opfor, true]; (units _obj) joinSilent _grp};
_units = units _obj;
_obj = ['B_Radar_System_01_F',_center,[8.8,11,0],_rotation,0] call _fnc_createObject;
createVehicleCrew _obj;
if (side _obj != A3E_VAR_Side_Opfor) then {_grp = createGroup [A3E_VAR_Side_Opfor, true]; (units _obj) joinSilent _grp};
_units joinSilent (group _obj); //
_obj lock 3; //玩家不可入侵

_parkedVehicleClasses = a3e_arr_ComCenParkedVehicles; //平民载具替换成通讯站的载具
_vehicle = selectRandom _parkedVehicleClasses;
_obj = [_vehicle,_center,[-6.7,-15.7,0],_rotation,360] call _fnc_createObject;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_vehicle = selectRandom _parkedVehicleClasses;
_obj = [_vehicle,_center,[-3,-17.2,0],_rotation,0] call _fnc_createObject;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_vehicle = selectRandom _parkedVehicleClasses;
_obj = [_vehicle,_center,[-10.5,-15.7,0],_rotation,0] call _fnc_createObject;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_armor = selectRandom _parkedArmorClasses; //装甲单位
_obj = [_armor,_center,[13.5,-32.9,0],_rotation,181] call _fnc_createObject;
[_obj,A3E_VAR_Side_Opfor] spawn A3E_fnc_AddStaticGunner;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true];
_obj setfuel (.1 + random .3); //

Escape_campType_arr pushback [_center,"兵营","Jade"];
publicVariable "Escape_campType_arr";

["A3E_MotorPoolMapMarker" + str _mNumber,_center,"o_service"] call A3E_fnc_createLocationMarker;

_marker = createMarkerLocal ["A3E_MotorPoolPatrolMarker" + str _mNumber, _center];
_marker setMarkerShapeLocal "RECTANGLE";
_marker setMarkerAlphaLocal 0;
_marker setMarkerSizeLocal [40,38];


